<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">

    <title>{$bi,$goods[goods_id]|goods_name_shift}-{$tpshop_config['shop_info_store_title']}</title>
    <meta http-equiv="keywords" content="{$tpshop_config['shop_info_store_keyword']}" />
    <meta name="description" content="{$tpshop_config['shop_info_store_desc']}" />
</head>

<body>
<!--------头部开始-------------->
<include file="Public/header" />
<!--------头部结束-------------->
<link rel="stylesheet" href="__STATIC__/css/page.css" type="text/css">
<link rel="stylesheet" href="__STATIC__/css/category.css" type="text/css">
<script src="__PUBLIC__/js/pc_common.js"></script>
<link rel="stylesheet" href="__STATIC__/css/jqzoom.css" type="text/css">
<link rel="stylesheet" href="__STATIC__/css/location.css" type="text/css"><!-- 收货地址，物流运费 -->

<script src="__PUBLIC__/js/layer/layer.js"></script>
<script src="__STATIC__/js/jquery.scrollToTop.min.js"></script>
<link rel="stylesheet" type="text/css" href="__STATIC__/css/homehtmleaf-demo.css">

<link rel="stylesheet" type="text/css" href="__STATIC__/css/cloudzoom.css" />
<script type="text/javascript" src="__STATIC__/js/cloudzoom.js"></script>
<script type="text/javascript" src="__STATIC__/js/jquery.tinycarousel.min.js"></script>
<script type="text/javascript">
	CloudZoom.quickStart({
	});
</script>  

<script type="text/javascript">
$(function() {
	$("#toTop").scrollToTop(1000);
});	
</script>

<a href="#top" id="toTop"></a>

    <div class="breadcrumb-area">
		<div class="layout">
			<a href="/">{$Think.lang.homepage}</a> >
			<foreach name="navigate_goods" key="k" item="v">
				<a  href="{:U('/Home/Goods/goodsList',array('id'=>$k))}">{$v}</a> >
			</foreach>
			<span> {$bi,$goods[goods_id]|goods_name_shift}</span>
		</div>
    </div>
	
<div class="layout">
    <div class="layout pa-to-10" style="padding-top: 23px;">
        <!--商品图片轮播-->
        <div class="left-area">
            <div class="left-area-tb">
                <div class="pro-gallery-img">
                    <img class = "cloudzoom" src = "{$goods.goods_id|goods_thum_images=750,1000}"
             data-cloudzoom = "zoomImage: '{$goods.goods_id|goods_thum_images=750,1000}',lensWidth:'399',lensHeight:'399'" />
                </div>
                
                <!-- 修改的部分-start -->
                <div class="pro-gallery-area">
                   <div id="slider5">
						<a class="buttons prev" href="#"></a>
						<div class="viewport">
							<ul class="overview" >
       						 <foreach name="goods_images_list" item="v" key="k" >
								<li><img class = 'cloudzoom-gallery' src = "{$v|get_sub_images=$v[goods_id],94,125}" data-cloudzoom = "useZoom: '.cloudzoom', image: '{$v|get_sub_images=$v[goods_id],750,1000}', zoomImage: '{$v|get_sub_images=$v[goods_id],750,1000}' "  ></li>
							 </foreach>
							</ul>
						</div>
						<a class="buttons next" href="#"><i class="fa fa-sort-up"></i></a>

						<script type="text/javascript">
							$(document).ready(function()
							{
								$("#slider5").tinycarousel({
									axis   : "y"
								});
							});
						</script>
					</div>
                    
                </div>
                <!-- 修改的部分-end -->
            </div>
			<div class="clear"></div>
			<div class="share_btn">
				<span>分享：</span>
				<div class="bshare-custom">
					<a title="分享到Facebook" class="bshare-facebook"></a>
					<a title="分享到Twitter" class="bshare-twitter"></a>
					<a title="分享到LinkedIn" class="bshare-linkedin"></a>
					<a title="分享到Pinterest" class="bshare-pinterest"></a>
					<a title="分享到Google+" class="bshare-gplus"></a>
					<a title="分享到微信" class="bshare-weixin"></a>
				</div>
				<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/buttonLite.js#style=-1&amp;uuid=&amp;pophcol=3&amp;lang=zh"></script>
				<script type="text/javascript" charset="utf-8" src="http://static.bshare.cn/b/bshareC0.js"></script>
				
			</div>
			<a href="javascript:;" onClick="collect_goods({$goods.goods_id});" class="add_fav"><img src="__STATIC__/images/add_facicton.jpg" >{$Think.lang.addbookmark}</a>
        </div>
        <!--商品图片轮播 end-->

        <div class="right-area-num">
            <div class="right-area">
                <div class="right-area-le30">
                    <h1> {$bi,$goods[goods_id]|goods_name_shift}<a href="#"><img src="__STATIC__/images/serivce_06.jpg" > {$Think.lang..contactservice}</a></h1>

                </div>
            </div>
            <div class="right-area ma-to--1">

                <!--商品促销 start-->
                <if condition="$goods['prom_type'] eq 1">
                    <div class="bef_fo2" style="font-size:14px; background-color:#000; height:30px; margin-top:15px;  color:#FFFFFF; line-height:30px; position:relative; width:457px;">
                        <p style="background-color:#000">
                            <span style="font-size:14px; padding:0px 16px 0px 26px; vertical-align:middle; ">{$Think.lang.buyingprice}￥{$goods['flash_sale']['price']}</span>
                            <img class="clock_w" src="__STATIC__/images/lz.png"/><span id="surplus_text">300天 01时 01分 01秒</span> 后结束，请快购买
                        </p>
                    </div>
                    <script>
                        // 倒计时
                        function GetRTime2(){
                            //var text = GetRTime('2016/02/27 17:34:00');
                            var text = GetRTime('{$goods['flash_sale']['end_time']|date="Y/m/d H:i:s",###}');
                            $("#surplus_text").text(text);
                        }
                        setInterval(GetRTime2,1000);
                    </script>
                </if>
                <!--商品促销 end-->
                
                   
                    
                <div class="right-area-le30 pa-3-0-0-30">

                    <div class="pro-promotions-area">
                        <table class="promotions-tab" width="100%" border="0" cellspacing="0" cellpadding="0">
      						<if condition="$promname">
                            <tr>
                                <td align="left">{$Think.lang.promotioninfo}：</td>
                                <td>
                                    <p class=" ma-le-6" style="color:#D10000;">{:$promname}</p>
                                    <!--------用户评价-end---------------->
                                </td>
                            </tr>
							</if>
                            <tr>
                                <td align="left">{$Think.lang.model}：</td>
                                <td>
                                    <p class=" ma-le-6" style="color:#848484;">{$goods.goods_sn} </p>
                                    <!--------用户评价-end---------------->
                                </td>
                            </tr>
                           
                            <tr>
                                <td width="80" align="left" style="letter-spacing:1px;" >{$Think.lang.repertory}：</td>
                                <td>
                                    <p class=" ma-le-6">
                                        <span ><if condition='$goods.store_count eq 0'><b style="color: #B70003;font-weight: normal;">{$Think.lang.stockout}</b><else/>{$goods.store_count} 件</if></span>
                                    </p>
                                </td>
                            </tr>
                            <tr>
                                <td width="80" align="left" style="letter-spacing:1px;" >{$Think.lang.marketprice}：</td>
                                <td>
                                    <p class=" ma-le-6">
                                        ￥<span >{$goods.shop_price}</span>
                                    </p>
                                </td>
                            </tr>
                            
                            <tr>
                                <td align="left">{$Think.lang.price1}：</td>
                                <td>
                                    <p class="co-red fo-si-24 ma-le-6">
                                        ￥<span class="co-red fo-si-24" id="goods_price">{$goods.shop_price}</span>
                                    </p>
                                </td>
                            </tr>
                            <if condition="($goods['shop_price'] egt ($goods['exchange_integral']/$point_rate)) AND $goods['exchange_integral'] gt 0">
                                <tr>
                                    <td  align="left">{$Think.lang.promotioninfo}：</td>
                                    <td>
                                        <p class="co-red fo-si-24 ma-le-6">
                                            ￥<span class="co-red fo-si-24">{$goods['shop_price']-$goods['exchange_integral']/$point_rate}+{$goods['exchange_integral']}积分</span>
                                        </p>
                                    </td>
                                </tr>
                            </if>


                            <tr>
                                <td  align="left">{$Think.lang.activity}：</td>
                                <td><p class="ma-le-6">{$Think.lang.man}￥{$freight_free}{$Think.lang.freeshipping}</p></td>
                            </tr>

                            <tr>
                                <td align="left" style="letter-spacing:1px;" >{$Think.lang.deliveryto}：</td>
                                <td><p class="ma-le-6">
                                    <!-- 收货地址，物流运费 -start-->
                                    <ul class="list1">
                                        <li class="summary-stock">
                                            <div class="dd">
                                                <!--<div class="addrID"><div></div><b></b></div>-->
                                                <div class="store-selector">
                                                    <div class="text" style="width: 150px;"><div></div><b></b></div>
                                                </div>

                                            </div>
                                        </li>
                                    </ul>
                                    <!-- 收货地址，物流运费 -end-->
                                    </p></td>
                            </tr>
                            <tr>
                            <td  align="left">{$Think.lang.serve}：</td>
                            <td><p class="ma-le-6">{$Think.lang.deliveryinfo}</p></td>
                            <td>
                               
                            </td>
                        </tr>

                        </table>
                    </div>
                </div>
            </div>
            <form name="buy_goods_form" method="post" id="buy_goods_form" >
                <div class="right-area he315 ma-to--1" >
                    <div class="right-area-le30 pa-3-0-0-30">
                        <div class="pro-promotions-area">
                            <table class="promotions-tab he40-tr-td" width="100%" border="0" cellspacing="0" cellpadding="0">
                                <foreach name="filter_spec" item="v" key="k" >
                                    <tr>
                                        <td width="70" align="left">{$k}：</td>
                                        <td>
                                            <ul class="choice-colol" style="margin-left:15px;">
                                                <foreach name="v" item="v2" key="k2" >
                                                    <if condition="$v2[src] neq ''">
                                                        <li>
                                                            <div class="color-sku-fant">
                                                                <div class="sku <if condition="$k2 eq 0 ">sku-bo-blo</if>">
                                                    <a onClick="switch_spec(this)"><img src="{$v2[src]}"  onClick="$('#bigImage').attr('src','{$v2[src]}');$('#bigImage').attr('jqimg','{$v2[src]}');"/></a>
                                                    <input type="radio" style="display:none;" name="goods_spec[{$k}]" value="{$v2[item_id]}"  <if condition="$k2 eq 0 ">checked="checked"</if>/>
                                                    <s></s>
                        </div>
                        <p>{$v2[item]}</p>
                    </div>
                    </li>
                    <else />
                    <li>
                        <div class="sku  <if condition="$k2 eq 0 ">sku-bo-blo</if>">
                        <a onClick="switch_spec(this);" class="choice-size">{$v2[item]}</a>
                        <input type="radio"  style="display:none;" name="goods_spec[{$k}]" value="{$v2[item_id]}" <if condition="$k2 eq 0 ">checked="checked"</if>  />
                        <s></s>
                </div>
                </li>
                </if>
                </foreach>
                </ul>
                </td>
                </tr>
                </foreach>
                
      <if condition='$goods.store_count neq 0'>
                <tr>
                    <td width="70" align="left">{$Think.lang.amount}：</td>
                    <td>
                        <ul class="choice-colol" style="margin-left:15px;">
                            <li>
                                <a onClick="switch_num(-1);" class="choice-number fl" title="减" style="width:24px">-</a>
                                <input class="wi43 fl" type="text" value="1" name="goods_num" id="goods_num" readonly/>
                                <a onClick="switch_num(1);" class="choice-number fl" title="加" style="width:24px">+</a>
                            </li>
                        </ul>
                    </td>
		  </tr></if>

                </table>
        </div>
        
	  <if condition='$goods.store_count eq 0'>
        <div class="join-a-shopping-cart fl" id="join_cart_now"><!-- location.href='{:U('Home/Cart/cart')}-->
            <a class="jrgwc-shopping-img jrgwc-shopping-img2" style="background-color: #8A8A8A;border: 1px solid #8a8a8a;">
                <span>{$Think.lang.purchasenow}</span>
            </a>
        </div>
        
        <else/>
         
        
        <div class="join-a-shopping-cart fl" id="join_cart_now"><!-- location.href='{:U('Home/Cart/cart')}-->
            <a class="jrgwc-shopping-img jrgwc-shopping-img2" onClick="javascript:AjaxAddCart({$goods.goods_id},1,1);">
                <span>{$Think.lang.purchasenow}</span>
            </a>
        </div>
    	</if>
    	
	  <if condition='$goods.store_count eq 0'>
        <div class="join-a-shopping-cart fl" id="join_cart" style="margin-left: 15px;display: inline;">
            <a class="jrgwc-shopping-img2 jrgwc-shopping-img3">
                <span>{$Think.lang.goodsstockout}</span>
            </a>
        </div>
         <else/>
         
        <div class="join-a-shopping-cart fl" id="join_cart" style="margin-left: 15px;display: inline;">
            <a class="jrgwc-shopping-img2 jrgwc-shopping-img3" onClick="javascript:AjaxAddCart({$goods.goods_id},1,0);">
                <span>{$Think.lang.addshoppingtrolley}</span>
            </a>
        </div>
    	</if>
    	

        <div class="join-a-shopping-cart fl" id="no_join_cart_now" style="display: none"><!-- location.href='{:U('Home/Cart/cart')}-->
            <a class="jrgwc-shopping-img jrgwc-shopping-img2" onClick="" style="background: grey;border-color: grey;">
                <span>{$Think.lang.purchasenow}</span>
            </a>
        </div>
        <div class="join-a-shopping-cart fl" id="no_join_cart" style="display: none">
            <a class="jrgwc-shopping-img2 jrgwc-shopping-img3" onClick=""  style="background: grey;border-color: grey;">
                <span>{$Think.lang.addshoppingtrolley}</span>
            </a>
        </div>

    </div>
</div>
<input type="hidden" name="goods_id" value="{$goods.goods_id}" />
</form>
</div>
</div>
</div>

<div style="display:none;" id="shopdilog">
    <div class="ui-popup ui-popup-modal ui-popup-show ui-popup-focus">
        <div i="dialog" class="ui-dialog">
            <div class="ui-dialog-arrow-a"></div>
            <div class="ui-dialog-arrow-b"></div>
            <table class="ui-dialog-grid">
                <tbody>
                <tr>
                    <td i="body" class="ui-dialog-body">
                        <div i="content" class="ui-dialog-content" id="content:1459321729418" style="width: 450px; height: auto;">
                            <div id="addCartBox" class="collect-public" style="display: block;">
                                <div class="colect-top">
                                    <i class="colect-icon"></i>
                                    <!--<i class="colect-fail"></i>-->
                                    <div class="conect-title">
                                        <span>{$Think.lang.addsuccess}</span>
                                        <div class="add-cart-btn fn-clear">
                                            <a href="javascript:;" class="ui-button ui-button-f80 fl go-shopping">{$Think.lang.continueshopping}</a>
                                            <a href="{:U('Home/Cart/index')}" class="ui-button ui-button-122 fl">{$Think.lang.goshoppingcart}</a>
                                        </div>
                                    </div>
                                </div>
                                <div id="watch">
                                    <span>{$Think.lang.alsobought}：</span>
                                    <ul class="fn-clear buy-list">
                                        <li>
                                            <a href="http://www.tp-shop.cn/item/201512CM310001099" class="watch-img" target="_blank">
                                                <img src="http://img01.fn-mart.com/C/item/2015/1231/201512C310000310/201512C310000245_134377335_200x200.jpg" alt="">
                                            </a>
                                            <h4><a href="http://www.tp-shop.cn/item/201512CM310001099" target="_blank">
                                                巨圣冬季2015新款马丁靴女 中跟粗跟保暖英伦骑士风短靴流苏套筒圆头L854174068</a></h4>
                                            <p>
                                                <q class="fn-rmb">¥</q><strong class="fn-rmb-num">89</strong></p></li>
                                        <li><a href="http://www.tp-shop.cn/item/201504CM150040438" class="watch-img" target="_blank">
                                            <img src="http://img02.fn-mart.com/C/item/2015/0415/201504C150036513/201504C150002841_817918286_200x200.jpg" alt=""></a>
                                            <h4><a href="http://www.tp-shop.cn/item/201504CM150040438" target="_blank">百依恋歌 夏装新款大码显瘦短袖T恤女士韩版图案棉打底衫</a></h4>
                                            <p><q class="fn-rmb">¥</q><strong class="fn-rmb-num">89</strong></p></li>
                                        <li><a href="http://www.tp-shop.cn/item/201505CM210000863" class="watch-img" target="_blank"><img src="http://img03.fn-mart.com/C/item/2015/0521/201505C210000474/_328370304_200x200.jpg" alt=""></a><h4><a href="http://www.tp-shop.cn/item/201505CM210000863" target="_blank">洁婷透气双U日用纤巧棉柔卫生巾尝4片/包</a></h4><p><q class="fn-rmb">¥</q><strong class="fn-rmb-num">4.2</strong></p></li><li><a href="http://www.tp-shop.cn/item/201508CM240002876" class="watch-img" target="_blank"><img src="http://img04.fn-mart.com/C/item/2015/0824/201508C240000788/201508C240000750_047866800_200x200.jpg" alt=""></a><h4><a href="http://www.tp-shop.cn/item/201508CM240002876" target="_blank">美纳福 真空收纳压缩袋 2特大4大4中2手卷送电泵</a></h4><p><q class="fn-rmb">¥</q><strong class="fn-rmb-num">135</strong></p>
                                    </li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td i="footer" class="ui-dialog-footer" style="display: none;">
                        <div i="statusbar" class="ui-dialog-statusbar" style="display: none;"></div>
                        <div i="button" class="ui-dialog-button"></div>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<div class="layout ma-to-20 ov-hi">

    <div class="ov-hi">
        <div class="comm-param">
            <div class="parame-title">
                <div class="par-titles co-grey">
                    <ul class="commodity-xq tab_li">
                        <li class="current cliks" onClick="switch_tab(this,'tab1')">
                            <a>{$Think.lang.productdetails}</a>
                        </li>
                      
                        <li class="cliks" onClick="switch_tab(this,'tab2')">
                            <a>{$Think.lang.sizeinfo}</a>
                        </li>
                        <li class="cliks" onClick="switch_tab(this,'tab3')">
                            <a>{$Think.lang.distributionandexchange}</a>
                        </li>
                        <li class="cliks" onClick="switch_tab(this,'tab4')">
                            <a>{$Think.lang.shoppingtips}</a>
                        </li>
						  <li class="cliks" onClick="switch_tab(this,'tab5')">
                            <a>{$Think.lang.commodityevaluation}（{$commentStatistics['c0']}）</a>
                        </li>
                    </ul>
                </div>
            </div>
            <!-------------------商品详情------------------>
            <div class="parame-bott cliks-bn" style="display:" id="tab1">
                <div class="commodity-num pro-feature-area">
                    <div class="pro-disclaimer-area">
                        {$goods.goods_content|htmlspecialchars_decode}
                        
						<div style="width: 98%;margin:0 auto;"><include file="Public/godds" /></div>
                    </div>
                </div>
            </div>
            <!-------------------规格参数------------------>
            <div class="parame-bott cliks-bn" style="display:none"  id="tab2">
                <div class="commodity-num pro-feature-area" style=" width: 95%;padding:0px 20px 36px; margin: 0 auto;">
                    <table class="modity-zhut" width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <th colspan="2" ><h3 style="padding-bottom: 20px;">{$Think.lang.commodityinfo}</h3></th>
                        </tr>
                        <foreach name="goods_attr_list" item="v" key="k" >
                            <tr>
                                <td class="wi143">{$goods_attribute[$v[attr_id]]}</td>
                                <td class="pa-5-0">{$v[attr_value]}</td>
                            </tr>
                        </foreach>
                    </table>
                </div>
            </div>
           
           <!-------------------售后服务------------------>
            <div class="parame-bott cliks-bn" style="display:none"  id="tab3">
                <div class="commodity-num pro-feature-area" style="padding:36px 20px">
                    配送及退換
                </div>
            </div>
           <!-------------------售后服务------------------>
            <div class="parame-bott cliks-bn" style="display:none"  id="tab4">
                <div class="commodity-num pro-feature-area" style="padding:36px 20px">
                    購物提示
                </div>
            </div>
            <!-------------------用户评价------------------>
            <div class="parame-bott ov-hi" style="display:none"  id="tab5">
                <div class="evaluation-top fo-fa di-in-bl">
                    <div class="eval-le1 fl wi146 te-al">
                        <span><b>{$commentStatistics['rate1']}</b>%</span>
                        <em>{$Think.lang.degreeofpraise}</em>
                    </div>
                    <div class="eval-le2 fl wi123 pa-to-7">
                        <dl>
                            <dt>{$Think.lang.goodreputation}<em>({$commentStatistics['rate1']}%)</em></dt>
                            <dd><s style=" width:94%"></s></dd>
                        </dl>
                        <dl>
                            <dt>{$Think.lang.mediumreview}<em>({$commentStatistics['rate2']}%)</em></dt>
                            <dd><s style=" width:2%"></s></dd>
                        </dl>
                        <dl>
                            <dt>{$Think.lang.negativecomment}<em>({$commentStatistics['rate3']}%)</em></dt>
                            <dd><s style=" width:4%"></s></dd>
                        </dl>
                    </div>
                    <div class="eval-le3 fl wi816">
                        <dl>
                            <dt>{$Think.lang.commenthint}</dt>
                        </dl>
                    </div>
                    <div class="eval-le4 fl wi150 pa-to-43 te-al">
                        <a href="{:U('Home/User/comment')}">{$Think.lang.addcomment}</a>
                    </div>
                </div>
				
                <div class="evaluation-cen fo-fa">
                    <div class="eval-cen-le fl pa-le-12">
                        <ul>
                            <li class="curres cliks">
                                <a href="javascript:void(0);" data-t='1'>
                                                <span>
                                                    {$Think.lang.allcomment}
                                                    <em>({$commentStatistics['c0']})</em>
                                                </span>
                                </a>
                            </li>
                            <li class="cliks">
                                <a href="javascript:void(0);" data-t='2'>
                                                <span>
                                                    {$Think.lang.goodreputation}
                                                    <em>({$commentStatistics['c1']})</em>
                                                </span>
                                </a>
                            </li>
                            <li class="cliks">
                                <a href="javascript:void(0);" data-t='3'>
                                                <span>
                                                    {$Think.lang.mediumreview}
                                                    <em>({$commentStatistics['c2']})</em>
                                                </span>
                                </a>
                            </li>
                            <li class="cliks">
                                <a href="javascript:void(0);" data-t='4'>
                                                <span>
                                                    {$Think.lang.negativecomment}
                                                    <em>({$commentStatistics['c3']})</em>
                                                </span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
				
                <!--------用户评价-start--------------->
                <!--<link rel="stylesheet" href="/Public/bootstrap/css/bootstrap.min.css" type="text/css">--->
                <div class="evaluation-bott pa-to-25 cliks-bn" style="display:block" id="ajax_comment_return">
                    <!--ajax 然后分页数据-->
                </div>
                <script>
                    $(document).ready(function(){
                        commentType = 1; // 评论类型
                        ajaxComment(1,1);// ajax 加载评价列表
                    });

                    // 好评差评 切换
                    $(".eval-cen-le a").click(function(){
                        $(".eval-cen-le li").removeClass('curres');
                        $(this).parent().addClass('curres');
                        commentType = $(this).data('t');// 评价类型   好评 中评  差评
                        ajaxComment(commentType,1);
                    });

                    // 用ajax分页显示评论
                    function ajaxComment(commentType,page){
                        $.ajax({
                            type : "GET",
                            url:"/index.php?m=Home&c=Goods&a=ajaxComment&goods_id={$goods['goods_id']}&commentType="+commentType+"&p="+page,//+tab,
                            success: function(data){
                                $("#ajax_comment_return").html('');
                                $("#ajax_comment_return").append(data);
                            }
                        });
                    }
                </script>
                <!--------用户评价-end---------------->
            </div>
        </div>

    </div>

    <div id="goods_history" class="layout">
        <h3><i class="icon-star"></i>{$Think.lang.hotsale}</h3>
        <ul id="history_list">
            <tpshop sql="SELECT * FROM `__PREFIX__goods` where is_recommend=1 and is_on_sale=1 ORDER BY `goods_id` DESC limit 0,6" key="k" item='v'>
                <li >
                    <a href="{:U('/Home/Goods/goodsInfo',array('id'=>$v[goods_id]))}" ><img src="{$v.goods_id|goods_thum_images=154,205}" >
                    <span>
                        {$bi,$v[goods_id],20|goods_name_shift}
                        <b><if condition="($v[market_price] neq $v[shop_price]) AND ($v[market_price] gt $v[shop_price])" ><em>¥{$v[market_price]}</em> </if>¥ {$v[shop_price]}</b>
                    </span>
                    </a>
                </li>

            </tpshop>
        </ul>
    </div>
</div>
</div>

<script>




    $(document).ready(function(){
        // 更新商品价格
        get_goods_price();
        
    });

    /**
     * 切换规格
     */
    function switch_spec(spec)
    {
        $(spec).siblings('input').trigger('click');	 // 让隐藏的 单选按钮选中
        $(spec).parent().parent().parent().parent().find("div.sku").removeClass('sku-bo-blo'); //   清空勾选图标
        $(spec).parent().addClass('sku-bo-blo'); // 当前 加上勾选图标
        // 更新商品价格
        get_goods_price();
    }

    /**
     * 购买商品数量加加减减
     */
    function switch_num(num)
    {
        var num2 = parseInt($("#goods_num").val());
        num2 += num;
        if(num2 < 1) num2 = 1; // 保证购买数量不能少于 1
        $("#goods_num").val(num2); // 修改商品购买数量
        // 更新商品价格
        //get_goods_price();
    }
    // 用作 sort 排序用
    function sortNumber(a,b)
    {
        return a - b;
    }
    /*** 查询商品价格*/
    function get_goods_price()
    {

        var goods_price = {$goods.shop_price}; // 商品起始价
        var store_count = {$goods.store_count}; // 商品起始库存

        var spec_goods_price = {$spec_goods_price};  // 规格 对应 价格 库存表   //alert(spec_goods_price['28_100']['price']);
        // 如果有属性选择项
        if(spec_goods_price != null)
        {
            goods_spec_arr = new Array();
            $("input[name^='goods_spec']:checked").each(function(){
                goods_spec_arr.push($(this).val());
            });
            var spec_key = goods_spec_arr.sort(sortNumber).join('_');  //排序后组合成 key
            goods_price = spec_goods_price[spec_key]['price']; // 找到对应规格的价格
            store_count = spec_goods_price[spec_key]['store_count']; // 找到对应规格的库存
        }

        var goods_num = parseInt($("#goods_num").val());
        // 库存不足的情况
        if(goods_num > store_count)
        {
            goods_num = store_count;
           // layer.msg('库存仅剩 '+store_count+' 件', {icon: 2}); //alert('库存仅剩 '+store_count+' 件');
			$.artTip('库存仅剩 '+store_count+' 件', 800);
            //$("#goods_num").val(goods_num);
        }

        var flash_sale_price = parseFloat("{$goods['flash_sale']['price']}");
        (flash_sale_price > 0) && (goods_price = flash_sale_price);

        $("#goods_price").html(goods_price); // 变动价格显示
    }

    /**
     * 切换 商品详情  用户评价  规格参数  包装清单  售后服务
     */
    function switch_tab(cur,tab)
    {
        $("#tab1,#tab2,#tab3,#tab4,#tab5").hide(); // 先全部隐藏
        $("#"+tab).show();	// 再显示其中一个
        $("ul.tab_li li").removeClass("current"); // 先全部样式去除
        $(cur).addClass("current"); //  单独的给当前点击这个加上
    }

    // 验证码切换
    function verify(){
        $('#verify_code').attr('src','/index.php?m=Home&c=Index&a=verify&type=consult&fontSize=20&length=4&r='+Math.random());
    }

    //缩略图切换
    $('.small-pic-li').each(function(i,o){
        var lilength = $('.small-pic-li').length;
        $(o).hover(function(){
            $(o).siblings().removeClass('current');
            $(o).addClass('current');
            $('#zoomimg').attr('src',$(o).find('img').attr('data-img'));
            $('#zoomimg').attr('jqimg',$(o).find('img').attr('data-big'));
            if(i==0){
                $('.next-left').addClass('disabled');
            }
            if(i+1==lilength){
                $('.next-right').addClass('disabled');
            }
        });
    })

    //前一张缩略图
    $('.next-left').click(function(){
        var newselect = $('.small-pic>.current').prev();
        $('.small-pic-li').removeClass('current');
        $(newselect).addClass('current');
        $('#zoomimg').attr('src',$(newselect).find('img').attr('data-img'));
        $('#zoomimg').attr('jqimg',$(newselect).find('img').attr('data-big'));
        var index = $('.small-pic>li').index(newselect);
        if(index==0){
            $('.next-left').addClass('disabled');
        }
        $('.next-right').removeClass('disabled');
    })

    //后前一张缩略图
    $('.next-right').click(function(){
        var newselect = $('.small-pic>.current').next();
        $('.small-pic-li').removeClass('current');
        $(newselect).addClass('current');
        $('#zoomimg').attr('src',$(newselect).find('img').attr('data-img'));
        $('#zoomimg').attr('jqimg',$(newselect).find('img').attr('data-big'));
        var index = $('.small-pic>li').index(newselect);
        if(index+1 == $('.small-pic>li').length){
            $('.next-right').addClass('disabled');
        }
        $('.next-left').removeClass('disabled');
    })
	
	$('.store-selector').mouseleave(function(){
       $('.store-selector').removeClass("hover");
    })
</script>

<!--------收货地址，物流运费-开始-------------->
<script src="__STATIC__/js/location.js"></script>
<!--------收货地址，物流运费--结束-------------->

<script src="__PUBLIC__/js/jqueryUrlGet.js"></script><!--获取get参数插件-->
<script> set_first_leader(); //设置推荐人 </script>

<!--------footer-开始-------------->
<include file="Public/footer" />
<!--------footer-结束-------------->
</body>
</html>
